<?php
require_once 'file.php';
require_once 'jsonAndxml.php';
$arr = array(
    'id'=>1,
    'name'=>'singea',
    'array'=>array(1,3,7=>array(123,'rsdf')),
    'object'=>array(
        'id' =>1,
        'name' =>'sing'
    )
);
//Response::json(200,'数据返回成功',$arr);
//Response::xml();
//Response::xmlEncode(200,'success',$arr);
//Response::show(200,'success',$arr,'json');
//Response::show(200,'success',$arr,'xml');
//Response::show(200,'success',$arr,'array');
$file = new File();
// 新增缓存
// if ($file->cacheData('index_mk_cache', $arr)){
//     echo "success";
// }else {
//     echo "error";
// }

//读取缓存
// if ($file->cacheData('index_mk_cache')){
//     var_dump($file->cacheData('index_mk_cache'));exit;
//     echo "success";
// }else {
//     echo "error";
// }

//删除缓存
if ($file->cacheData('index_mk_cache',null)){
    
    echo "success";
}else {
    echo "error";
}